#include "db_wdg.h"

/**
* @brief Watchdog initialization
* @param
*    
*    
* @return none
*/
void wdg_init(void)
{
	IWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);                             //使能对看门狗操作
	IWDG_SetPrescaler(WdgGHz);                                    		      //设置他的预分频值 64分频
	IWDG_SetReload(WdgStarter);                                               //重新装载值
	IWDG_ReloadCounter();  													  //按照IWDG重装载寄存器的值重装载IWDG计数器
	
	IWDG_Enable();  														  //使能IWDG
}
/**
* @brief feed dog
* @param
*    
*    
* @return none
*/
void iwdg_feed(void)
{   
 	IWDG_ReloadCounter();													  //喂狗										   
}


